<?php
/**
 * Created by PhpStorm.
 * User: 轶杰
 * Date: 2016/5/19
 * Time: 19:51
 */

require_once 'include.php';
$search=$_POST['search'];
if(isset($search))
{
	$search=$DB->checkInjection($search);
	$sql="select * from my_article WHERE name LIKE '%{$search}%'";
}
else
{
	$sql="select * from my_article";
}
$article=$DB->fetchAll($sql);